package com.itheima.localdatetime;

import java.time.Duration;
import java.time.LocalDateTime;

public class Demo07 {

    public static void main(String[] args) {
        Duration between = Duration.between(LocalDateTime.now(), LocalDateTime.of(2050, 11, 11, 11, 11, 11));
        System.out.println(between);
        System.out.println(between.getSeconds());
        System.out.println(between.getNano());
        System.out.println(between.toHours());
        System.out.println(between.toMinutesPart());
        System.out.println(between.toSeconds());
        System.out.println(between.toNanos());

    }
}
